3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
Figure 19 shows a cone.
Vector3D orientation
Vector3D majorRadius
Vector3D minorRadius
Point3D origin
Float32 uMin
Float32 uMax
Float32 vMin
Float32 vMax
A cone is a three-dimensional object defined by an origin (that is, the center of the base) and three vectors that define the orientation and major and minor radii of the cone. A cap may be attached to the base of a cone. Attributes may be assigned to the cap and face of a cone, and also to the entire cone.
The default surface parameterization for a cone is as shown in Figure 19 .
Caps (optional), bottom cap attribute set (optional), face cap attribute set (optional), attribute set (optional). A cone must have a bottom cap in order to have a bottom cap attribute set. Use Caps ( Bottom ) to set a cap on the base of a cone.
Container (
Cone (
0 1 0 # orientation
0 0 1 # major axis
1 0 0 # minor axis
0 0 0 # origin
0 # uMin
1 # uMax
0 # vMin
1 # vMax
)
Caps ( Bottom )
Container (
BottomCapAttributeSet ( )
Container (
AttributeSet ( )
DiffuseColor ( 1 0 0 )
)
)
Container (
FaceCapAttributeSet ( )
Container (
AttributeSet ( )
DiffuseColor ( 0 0 1 )
)
)
)
See the note in "Cylinders" , for an explanation of cap attribute sets.
Previous | QD3D Book | Overview | Chapter Contents | Next |